package com.suncaper.han_yi_system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.suncaper.han_yi_system.pojo.dto.ApplicationQueryDto;
import com.suncaper.han_yi_system.pojo.dto.ApplicationResultDto;
import com.suncaper.han_yi_system.pojo.entity.Application;
import com.suncaper.han_yi_system.pojo.vo.ApplicationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 申请表 Mapper 接口
 */
@Mapper
public interface ApplicationMapper extends BaseMapper<Application> {
    Page<ApplicationVo> findApplicationByQueryDto(Page<ApplicationVo> page, @Param("application") ApplicationQueryDto queryDto);

    Page<ApplicationVo> findMyApplication(Page<ApplicationVo> page, @Param("application") ApplicationQueryDto queryDto);

    int resultByCounselor(@Param("resultDto") ApplicationResultDto resultDto, @Param("userId") Long userId);

    int resultByCollege(@Param("resultDto") ApplicationResultDto resultDto, @Param("userId") Long userId);

    int resultBySchool(@Param("resultDto") ApplicationResultDto resultDto);

    int submitByCounselor(@Param("userId") Long userId, @Param("ids") List<Long> ids);

    int submitByCollege(@Param("userId") Long userId, @Param("ids") List<Long> ids);

    int submitBySchool(@Param("ids") List<Long> ids);
}